<?php


namespace app\common\model;


class Feedback extends BaseModel{
    protected $updateTime = false;

    public function getImagesAttr($value,$data){
        return explode(',',$value);
    }

    public function comment(){
        return $this->hasMany('FeedbackComment','f_id','id')->order('created_at','asc')->page(1,2);
    }

    public function user(){
        return $this->belongsTo('User','user_id','id')->field('id,nickname,avatar,education');
    }
}